import { all, takeLatest, select, takeEvery, take } from 'redux-saga/effects'
import { LOGIN } from '../store/user'
import { login } from './user'

function* watchAndLog() {
    while (true) {
        const action = yield take('*');
        const state = yield select();
        console.log('action', action);
        console.log('state after', state)
    }
}

export default function* root() {
    yield all([takeLatest(LOGIN, login)])
}